package com.zhixi.pattern.important.responsibilitychainpattern.operation;

/**
 * @作者 ShuHaoNan
 * @邮箱 shuhaonan1@gmail.com
 * @时间 2020/11/17 14:29
 */
public class DaughterClass implements Daughter {

    /**
     * 1 -- 父亲
     * 2 -- 母亲
     * 3 -- 哥哥
     */
    private int tyoe;

    /* 请求 */
    private String request = "";

    public DaughterClass(int tyoe, String request) {
        this.tyoe = tyoe;
        switch (this.tyoe) {
            case 1:
                this.request = "女儿向父亲请求" + request;
                break;
            case 2:
                this.request = "女儿向母亲请求" + request;
                break;
            case 3:
                this.request = "女儿向哥哥请求" + request;
                break;
        }
    }

    @Override
    public int getType() {
        return this.tyoe;
    }

    @Override
    public String getRequest() {
        return this.request;
    }

}
